package responsechain.handeler;

import responsechain.factory.ChainFactory;
import responsechain.factory.impl.InterviewFactory;
import log.Log;

import java.util.Arrays;
import java.util.List;

public class Main {
    public static void main(String[] args) {
        List<Interview> interviews = Arrays.asList(
                Interview.builder().name("小王").sex(0).average(90).canDrive(true).english(50).health(false).build()
                , Interview.builder().name("小李").sex(0).average(20).canDrive(true).english(40).health(true).build()
                , Interview.builder().name("小马").sex(0).average(90).canDrive(true).english(90).health(false).build()
                , Interview.builder().name("小名").sex(1).average(90).canDrive(true).english(90).health(false).build()
                , Interview.builder().name("小刘").sex(1).average(80).canDrive(true).english(90).health(false).build()
                , Interview.builder().name("小张").sex(1).average(30).canDrive(true).english(10).health(false).build()
        );
        ChainFactory chainFactory = new InterviewFactory();
        Handler header = chainFactory.getResponseChainHeader();
        Log.printName(header.toString() + "\n", Log.green);
        interviews.forEach(header::next);
        System.out.println("----------员工列表----------");
        header.employee();
    }

}
